package io.itit.ecp.admin.server.service.impl;

import icu.mhb.mybatisplus.plugln.base.service.impl.JoinServiceImpl;
import io.itit.ecp.admin.server.entity.EarlyWarningThresholdEntity;
import io.itit.ecp.admin.server.mapper.EarlyWarningThresholdMapper;
import io.itit.ecp.admin.server.service.IEarlyWarningThresholdService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：预警阈值服务实现类
 * @Date：Create by 2023-12-04 14:51:04
 */
@Service
public class EarlyWarningThresholdServiceImpl extends JoinServiceImpl<EarlyWarningThresholdMapper, EarlyWarningThresholdEntity> implements IEarlyWarningThresholdService {


    @Override
    public List<EarlyWarningThresholdEntity> getThresholds(String earlyWarningId){
        return this.lambdaQuery()
                .eq(EarlyWarningThresholdEntity::getEarlyWarningId, earlyWarningId)
                .orderByAsc(EarlyWarningThresholdEntity::getThresholdLevel).list();
    }

}
